import java.io.BufferedReader;
import java.io.InputStreamReader;


public class Main {
	
	private static final int MOD = 761238923;
	
	public static void main(String[] args) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		while(true) {
			String str = br.readLine().trim();
			int n = Integer.parseInt(str);
			if(n == 0) {
				break;
			}
			
			int[][] mem = new int[n + 1][n + 1];
			for(int i = 0; i <= n; i++) {
				for(int j = 0; j <= n; j++) {
					mem[i][j] = -1;
				}
			}
			
			System.out.println(findCombi(n, n, mem));
		}
	}
	
//	public static void main(String[] args) throws Exception {
//		int n = 2, k = 0;
//		int[][] mem = new int[n + 1][n + 1];
//		for(int i = 0; i <= n; i++) {
//			for(int j = 0; j <= n; j++) {
//				mem[i][j] = -1;
//			}
//		}
//
//		System.out.println(findCombi(n, k, mem));
//	}
//	
	private static int findCombi(int n, int k, int[][] mem) {
		if(mem[n][k] != -1) {
			return mem[n][k];
		}

		if(k == 0) {
			mem[n][k] = 1;
			return 1;
		}
		
		if(n == 0) {
			mem[n][k] = 0;
			return 0;
		}
		
		if(k > n) {
			mem[n][k] = 0;
			return 0;
		}
		
		int val = 0;
		for(int i = k; i >=0; i--) {
			val = (val + findCombi(n - 1, i, mem)) % MOD;
		}
		mem[n][k] = val;
		return mem[n][k];
	}

}
